
def attrs(**kv):
	def decorate(f):
		for k in kv:
			print k, kv[k]
			setattr(f, k, kv[k])
		return f
	return decorate


@attrs(name='xavier', gender='m')
def my_method(f):
	pass

if __name__ == '__main__':
	o = object()
	my_method(o)
	print getattr(my_method, 'name')
	print getattr(my_method, 'gender')

